<?php
$path = "../";
include_once($path.'configuration.php');

$listing = $dbh->getAllMachine();
	
foreach($listing as $machine){
	$host= $machine['IP'];
	
	exec("ping " . $host, $output, $result);

	if ($result == 0)

	echo "Ping successful!";

	else

	echo "Ping unsuccessful!";
}